package com.fsserver.facedetection.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 人脸矩形位置信息
 * 
 * @author fsserver
 * @since 2024-01-01
 */
@Data
@ApiModel(description = "人脸矩形位置信息")
public class FaceRect {

    @ApiModelProperty(value = "矩形左上角X坐标", example = "100")
    private Integer x;

    @ApiModelProperty(value = "矩形左上角Y坐标", example = "50")
    private Integer y;

    @ApiModelProperty(value = "矩形宽度", example = "200")
    private Integer width;

    @ApiModelProperty(value = "矩形高度", example = "200")
    private Integer height;

    @ApiModelProperty(value = "置信度（0-1）", example = "0.95")
    private Double confidence;

    public FaceRect() {}

    public FaceRect(int x, int y, int width, int height) {
        this.x = x;
        this.y = y;
        this.width = width;
        this.height = height;
    }

    public FaceRect(int x, int y, int width, int height, double confidence) {
        this(x, y, width, height);
        this.confidence = confidence;
    }
} 